﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.Decorator.StudentStudy.Models
{
    /// <summary>
    /// 组合 + 继承
    /// </summary>
    public class BaseDecorator : AbstractStudent
    {
        private AbstractStudent _student;//组合
        public BaseDecorator(AbstractStudent student)
        {
            _student = student;
        }

        /// <summary>
        /// 学习
        /// </summary>
        public override void Study()
        {
            _student.Study();
        }
    }
}
